{%- if page.lazy-images == true -%}
<script async src="/assets/js/lazysizes.min.js"></script>
{%- endif -%}

{%- if jekyll.environment == 'production' -%}
<!-- Google Analytics -->
<script defer src="https://www.googletagmanager.com/gtag/js?id=G-7602GXEZ0R"></script>
<script defer>
  window.dataLayer = window.dataLayer || [];
  function gtag() { dataLayer.push(arguments); }
  gtag('js', new Date());
  gtag('config', 'G-7602GXEZ0R', { cookie_flags: 'SameSite=Lax; Secure' });
</script>

{%- if site.clarity == 'true' -%}
<!-- Clarity -->
<script defer type="text/javascript">
  (function (c, l, a, r, i, t, y) {
    c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments) };
    t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i;
    y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y);
  })(window, document, "clarity", "script", "d7dwkk1jqt");
</script>
{%- endif -%}
{%- endif -%}
